{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import gym\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2018-02-18 00:34:28,110] Making new env: MountainCar-v0\n"
     ]
    }
   ],
   "source": [
    "env = gym.envs.make(\"MountainCar-v0\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD8CAYAAAB9y7/cAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAFnBJREFUeJzt3X+spFd93/H3p7b5UaAxxrfWdnddO7AtctKwNrfGCFQRWyTGjWJHSpGtNliRpY1aI4GC2tipFOwqSInU4BYptWpigqko4PKjWMgNcYyliD+wWYPxTxwWMPKuFu8CxkCjurX59o97rhlf37137vx+nnm/pNE8z3memTlnd+5nzpw5ZyZVhSSpf/7OvCsgSZoOA16SesqAl6SeMuAlqacMeEnqKQNeknpqagGf5OIkjyY5lOSaaT2OJGlzmcY8+CQnAX8DvBU4DHwZuKKqHp74g0mSNjWtHvz5wKGq+lZV/V/g48ClU3osSdImTp7S/e4GHh/YPwy84UQnn3766XXWWWdNqSqS1D2PPfYY3/ve9zLOfUwr4LeV5ABwAODMM8/k4MGD86qKJC2c1dXVse9jWkM0R4C9A/t7WtlzquqmqlqtqtWVlZUpVUOSlte0Av7LwL4kZyd5EXA5cNuUHkuStImpDNFU1TNJ3gl8HjgJ+FBVPTSN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uxFtL7i/Kdtf+gV5yx2uwAK+Msk97ZV8ND95+LZwHHgz9uw2p8leRkTbNe8A773au2ltrNTlZK8HPgU8O6q+tHgsa62raqerar9rPV4zwdeO+cqjS0DK87nXZcpeXNVncfaMMXVSf7Z4MGOPhdPBs4Dbqyqc4H/zYZp5eO2a94Bv77qdd3gitgueyLJLoB2fayVd6q9SU5hLdw/WlWfbsW9aBtAVf2QtQV7b6StzG6HNluZzYKvzF5fcf4Y8HHWhmmeW3HezuliuwCoqiPt+hjwGdZemLv+XDwMHK6qu9v+J1kL/Im1a94B/2VgX/uk/0WsrZS9bc51moTB1bwbV/m+o30afgHw1MBbsYWSJKwtWnukqt4/cKjTbUuykuTUtv1S1j5XeISOr8yuHq84T/KyJK9Y3wZ+BXiQjj8Xq+q7wONJ/nErugh4mEm2awE+aLgE+BvWxkH//bzrM0L9PwYcBf4fa6/IV7E2lnkn8A3gr4DT2rlhbdbQN4EHgNV513+Ldr2ZtbeG9wP3tcslXW8b8EvAV1u7HgT+oJX/PHAPcAj4H8CLW/lL2v6hdvzn592GIdr4FuBzfWlXa8PX2uWh9Zzo+nOx1XU/cLA9H/8n8MpJtsuVrJLUU/MeopEkTYkBL0k9ZcBLUk8Z8JLUUwa8JPWUAS9JPWXAS1JPGfCS1FP/H5Be/hQJ4vkIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f8f7bf5f850>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD8CAYAAAB9y7/cAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAFnJJREFUeJzt3X+MpdV93/H3p4B/1HaDMVO03V0Kibe1SFUveIqxbFUOyAmmVSFSaoGq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SdKEGPCS1FMGvCT1lAEvST1lwEtSTxnwktRTBrwk9ZQBL0k99f8BGojYI2lZwsMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f8f745d7dd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "env.reset()\n",
    "plt.figure()\n",
    "plt.imshow(env.render(mode='rgb_array'))\n",
    "\n",
    "[env.step(0) for x in range(10000)]\n",
    "plt.figure()\n",
    "plt.imshow(env.render(mode='rgb_array'))\n",
    "\n",
    "env.render(close=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
